package com.banggood.upms.dao;

import com.banggood.upms.bean.po.Permission;
import com.banggood.upms.bean.vo.search.TreePermissionSearchCriteria;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface PermissionDao extends BaseDao<Permission>{

    /**
     * 根据系统ID跟树节点的ID集合,搜索所有权限
     * @param criteria
     * @return
     */
    List<Permission> selectBySystemIdAndTreeIds(TreePermissionSearchCriteria criteria);

    /**
     * 根据系统ID删除权限
     * @param id
     * @return
     */
    int deleteBySystemId(String id);

    /**
     * 根据系统ID搜索权限的ID
     * @param id
     * @return
     */
    List<String> selectPermIdsBySystemId(String id);
}